home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 641 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.3 KB

  1. Path: reuse.postech.ac.kr!madincom
  2. From: madincom@reuse.postech.ac.kr (Oh Jun-hee)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: about for loop
  5. Date: 5 Jan 1996 14:47:22 GMT
  6. Organization: POSTECH, Pohang, Korea
  7. Message-ID: <4cjdlq$hc5@xpat.postech.ac.kr>
  8. References: <4civik$cmg@peter.pu.edu.tw>
  9. NNTP-Posting-Host: reuse.postech.ac.kr
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. s8311116@csim49.pu.edu.tw wrote:
  13. >   if i write this for loop"for(i=0 ; i<=10 ; i++ )
  14. >                            cout<< i ;
  15. >   the result should be " 12345678910 " or " 0123456789 " ?
  16. >   and what is "double linked list " ??
  17. >   thanks!
  18.  
  19. I. the result of "for loop" is 0123456789 ...
  20.  
  21. for (initialization code;
  22.     condition for continue;
  23.     the instruction which will be executed    after each loop)
  24.                                             ^^^^^
  25.  
  26. So, the instruction i++ will be first executed    after first loop.
  27.                                                 ^^^^^
  28.  
  29. II. doubly linked list is a linked-list whose nodes have two pointers
  30. , one of them pointing previous node and the other pointing next node.
  31.  
  32.  
  33. //-------------------------------------------------------------------
  34. // Computer Science and Engineering at POSTECH
  35. // 9325019 Oh Joon-Hee
  36. //
  37. // email :    madincom@snow.postech.ac.kr
  38. //            madincom@pobee.postech.ac.kr
  39. //-------------------------------------------------------------------
  40.